/*
 ============================================================================
 Name		: CommonXBaseAppView.h
 Author	  : Cxt_programmer
 Copyright   : Your copyright notice
 Description : Declares view class for application.
 ============================================================================
 */

#ifndef __COMMONXBASEAPPVIEW_h__
#define __COMMONXBASEAPPVIEW_h__

// INCLUDES
#include <coecntrl.h>

#include "cx_gdi.h"
#include "cx_event_def.h"


// CLASS DECLARATION
class CCommonXBaseAppView : public CCoeControl, MCoeControlObserver
	{
public:
	// New methods

	/**
	 * NewL.
	 * Two-phased constructor.
	 * Create a CCommonXBaseAppView object, which will draw itself to aRect.
	 * @param aRect The rectangle this view will be drawn to.
	 * @return a pointer to the created instance of CCommonXBaseAppView.
	 */
	static CCommonXBaseAppView* NewL(const TRect& aRect);

	/**
	 * NewLC.
	 * Two-phased constructor.
	 * Create a CCommonXBaseAppView object, which will draw itself
	 * to aRect.
	 * @param aRect Rectangle this view will be drawn to.
	 * @return A pointer to the created instance of CCommonXBaseAppView.
	 */
	static CCommonXBaseAppView* NewLC(const TRect& aRect);

	/**
	 * ~CCommonXBaseAppView
	 * Virtual Destructor.
	 */
	virtual ~CCommonXBaseAppView();

public:
	// Functions from base classes

	/**
	 * From CCoeControl, Draw
	 * Draw this CCommonXBaseAppView to the screen.
	 * @param aRect the rectangle of this view that needs updating
	 */
	void Draw(const TRect& aRect) const;

	/**
	 * From CoeControl, SizeChanged.
	 * Called by framework when the view size is changed.
	 */
	virtual void SizeChanged();

	/**
	 * From CoeControl, HandlePointerEventL.
	 * Called by framework when a pointer touch event occurs.
	 * Note: although this method is compatible with earlier SDKs, 
	 * it will not be called in SDKs without Touch support.
	 * @param aPointerEvent the information about this event
	 */
	virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent);
	
	//TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType);
	virtual TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
	
	virtual void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);

private:
	// Constructors

	/**
	 * ConstructL
	 * 2nd phase constructor.
	 * Perform the second phase construction of a
	 * CCommonXBaseAppView object.
	 * @param aRect The rectangle this view will be drawn to.
	 */
	void ConstructL(const TRect& aRect);

	/**
	 * CCommonXBaseAppView.
	 * C++ default constructor.
	 */
	CCommonXBaseAppView();
	/* test for vector's interface*/
	char* Test_List_vector();
	
	CXGC cxGc;
	CXIMAGE pImage;
	QWCHAR *wChar;

	
	TQEventCode nCxKeyType;
	QINT nCxKeyValue;
	
	};

#endif // __CommonXBaseAPPVIEW_h__
// End of File
